/********************************************************************************
 *      Copyright:  (C) 2022 Nikel
 *                  All rights reserved.
 *
 *       Filename:  INIT.h
 *    Description:  This head file
 *
 *        Version:  1.0.0(05/05/22)
 *         Author:  zhouyanlin <www.zhouyanlin1222@qq.com>
 *      ChangeLog:  1, Release initial version on "05/05/22 09:45:58"
 *
 ********************************************************************************/

#ifndef _CONF_H_
#define _CONF_H_

#include <dictionary.h>
#include <iniparser.h>

#include "json.h"
#include "msqt.h"
#include "sqlite.h"
#include "log.h"
#include "sign.h"

typedef struct app_ctx_s
{
    mqtt_ctx_t      mqtt_ctx;
    pack_ctx_t      pack_ctx;
    sqlite_ctx_t    sqlite_ctx;
    time_ctx_t      time_ctx;
    int             debug;          // debug switch
    int             my_daemon;

} app_ctx_t;

int init_config_mqtt(sqlite_ctx_t *sqlite_ctx, mqtt_ctx_t *mqtt_ctx, pack_ctx_t *json, int platform);

int init_config_total(app_ctx_t *app_ctx);

#endif /* ----- #ifndef _INIT_H_  ----- */
